package com.lion.ball.app.common.inject;

import androidx.lifecycle.ViewModelProvider;

import com.chris.libs.base.x.mvpp.application.AppGlobal;
import com.lion.ball.app.pages.tabs.main.cate.CateViewModel;
import com.lion.ball.app.pages.tabs.main.message.MessageViewModel;
import com.lion.ball.app.pages.tabs.main.mine.MineViewModel;
import com.lion.ball.app.pages.tabs.main.order.OrderViewModel;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

/**
 * @author Chris chan
 * Create on： 2025/2/1 9:56
 * Use for:
 * Explain:
 */
@Module
public class AppModule {
    @Singleton
    @Provides
    public CateViewModel provideCateViewModel() {
        return new ViewModelProvider(AppGlobal.getOwner()).get(CateViewModel.class);
    }

    @Singleton
    @Provides
    public OrderViewModel provideOrderViewModel() {
        return new ViewModelProvider(AppGlobal.getOwner()).get(OrderViewModel.class);
    }

    @Singleton
    @Provides
    public MessageViewModel provideMessageViewModel() {
        return new ViewModelProvider(AppGlobal.getOwner()).get(MessageViewModel.class);
    }

    @Singleton
    @Provides
    public MineViewModel provideMineViewModel() {
        return new ViewModelProvider(AppGlobal.getOwner()).get(MineViewModel.class);
    }
}
